home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Internet Info 1994 March
/
Internet Info CD-ROM (Walnut Creek) (March 1994).iso
/
networking
/
ip
/
ka9q
/
src.arc
/
FILES.C
< prev
next >
Wrap
C/C++ Source or Header
|
1989-08-19
|
4KB
|
98 lines
#include "global.h"
/* System-dependent definitions of various files, spool directories, etc */
#ifdef MSDOS
char *Startup = "/autoexec.net"; /* Initialization file */
char *Userfile = "/ftpusers"; /* Authorized FTP users and passwords */
char *Maillog = "/spool/mail.log"; /* mail log */
char *Mailspool = "/spool/mail"; /* Incoming mail */
char *Mailqdir = "/spool/mqueue"; /* Outgoing mail spool */
char *Mailqueue = "/spool/mqueue/*.wrk"; /* Outgoing mail work files */
char *Routeqdir = "/spool/rqueue"; /* queue for router */
char *Alias = "/alias"; /* the alias file */
char *Dfile = "/domain.txt"; /* Domain cache */
char *Fdir = "/finger"; /* Finger info directory */
#define SEPARATOR "/"
#endif
#ifdef UNIX
char *Startup = "./startup.net"; /* Initialization file */
char *Config = "./config.net"; /* Device configuration list */
char *Userfile = "./ftpusers";
char *Mailspool = "/usr/spool/mail";
char *Maillog = "/spool/mail.log"; /* mail log */
char *Mailqdir = "/usr/spool/mqueue";
char *Mailqueue = "/usr/spool/mqueue/*.wrk";
char *Routeqdir = "/spool/rqueue"; /* queue for router */
char *Alias = "/alias"; /* the alias file */
char *Dfile = "./domain.txt"; /* Domain cache */
char *Fdir = "/finger"; /* Finger info directory */
#define SEPARATOR "/"
#endif
#ifdef AMIGA
char *Startup = "TCPIP:net.start";
char *Config = "TCPIP:config.net"; /* Device configuration list */
char *Userfile = "TCPIP:ftpusers";
char *Mailspool = "TCPIP:spool/mail";
char *Maillog = "TCPIP:spool/mail.log";
char *Mailqdir = "TCPIP:spool/mqueue";
char *Mailqueue = "TCPIP:spool/mqueue/*.wrk";
char *Routeqdir = "TCPIP:spool/rqueue"; /* queue for router */
char *Alias = "TCPIP:alias"; /* the alias file */
char *Dfile = "TCPIP:domain.txt"; /* Domain cache */
char *Fdir = "TCPIP:finger"; /* Finger info directory */
#define SEPARATOR "/"
#endif
#ifdef MAC
char *Startup ="Mikes Hard Disk:net.start";
char *Config = "Mikes Hard Disk:config.net"; /* Device configuration list */
char *Userfile = "Mikes Hard Disk:ftpusers";
char *Mailspool = "Mikes Hard Disk:spool:mail:";
char *Maillog = "Mikes Hard Disk:spool:mail.log:";
char *Mailqdir = "Mikes Hard Disk:spool:mqueue:";
char *Mailqueue = "Mikes Hard Disk:spool:mqueue:*.wrk";
char *Routeqdir = "Mikes Hard Disk:spool/rqueue:"; /* queue for router */
char *Alias = "Mikes Hard Disk:alias"; /* the alias file */
char *Dfile = "Mikes Hard Disk:domain:txt"; /* Domain cache */
char *Fdir = "Mikes Hard Disk:finger"; /* Finger info directory */
#define SEPARATOR ":"
#endif
static char *strcatdup __ARGS((char *a,char *b,char *c));
/* Establish a root directory other than the default. Can only be called
* once, at startup time
*/
void
initroot(root)
char *root;
{
Startup = strcatdup(root,SEPARATOR,Startup);
Userfile = strcatdup(root,SEPARATOR,Userfile);
Maillog = strcatdup(root,SEPARATOR,Maillog);
Mailspool = strcatdup(root,SEPARATOR,Mailspool);
Mailqdir = strcatdup(root,SEPARATOR,Mailqdir);
Mailqueue = strcatdup(root,SEPARATOR,Mailqueue);
Routeqdir = strcatdup(root,SEPARATOR,Routeqdir);
Alias = strcatdup(root,SEPARATOR,Alias);
Dfile = strcatdup(root,SEPARATOR,Dfile);
Fdir = strcatdup(root,SEPARATOR,Fdir);
}
/* Concatenate three strings into a malloc'ed output buffer */
static char *
strcatdup(a,b,c)
char *a,*b,*c;
{
char *out;
out = malloc(strlen(a) + strlen(b) + strlen(c) + 1);
strcpy(out,a);
strcat(out,b);
strcat(out,c);
return out;
}